package MathDataTest;
import java.text.DecimalFormat;

public class MathDemo5 {
    public static void main(String[] args) {
        //获取圆周率
        double pi = Math.PI;
        System.out.println(pi);
        //保留一位整数
        System.out.println(new DecimalFormat("0").format(pi));
    }
}
